package day4;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class SexTest {
    public static void main(String[] args) {
//         Sex s=Sex.女;
//
//        System.out.println(s);
//        System.out.println(s.name()+".位置："+s.ordinal());
//        Sex s2 = Sex.valueOf("男");
//        System.out.println(s2);
        Scanner in=new Scanner(System.in);
        Student2 st=new Student2();
        System.out.println("请输入姓名：");
        st.setName(in.next());
        System.out.println("请输入age：");
        st.setAge(in.nextInt());
        System.out.println("请输入性别：");
        st.setSex(Sex.valueOf(in.next()));
        System.out.println(st);
    }
}
